package com.itheima.lambda.practice02;

public class FlyableDemo {
    public static void main(String[] args) {
        useFlyable(new Flyable() {
            @Override
            public void fly(String s) {
                System.out.println("飞机自驾游"+s);
            }
        });
        useFlyable((String s)->{
            System.out.println("飞机自驾游"+s);
        });
    }
    public static void useFlyable(Flyable f){
        f.fly("天气晴朗");
    }

}

interface Flyable{
    void fly(String s);
}